package org.or5e.api.calendar;

import java.util.Calendar;
import java.util.Iterator;
import java.util.List;

import org.or5e.core.OSGiEvents;

/**
 * @author Ponraj Suthanthiramani
 */
public interface JCalendar extends OSGiEvents {
    public void initilizeCalendar(String calendarName) throws CalendarException;
    public void destroyCalendar(String calendarName) throws CalendarException;
    public void loadCalendar(String calendarName, String datafile) throws CalendarException;

    // CRUD Operations on Calender module
    public void createCalendarEntry(String calenderName, CalendarEntry calendarEntry) throws CalendarException;
    public List<CalendarEntry> retriveCalendarEntries(String calendarName, Calendar startDate, Calendar endDate) throws CalendarException;
    public List<CalendarEntry> retriveCalendarEntries(String calendarName, String meetingOrganizer) throws CalendarException;
    public Iterator<CalendarEntry> getIterator(String calendarName) throws CalendarException;
    public void updateCalendarEntry(String calendarName, CalendarEntry calendarEntry) throws CalendarException;
    public void deleteCalendarEntry(String calendarName, CalendarEntry calendarEntry) throws CalendarException;
    public int deleteCalendarEntries(String calendarName, List<CalendarEntry> entries) throws CalendarException;

    //Listeners API
    public void addListener(JCalenderListener listener);
}